﻿<Window x:Class="DotBeer.UI.WPFClient.WindowOptions"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:System="clr-namespace:System;assembly=mscorlib" 
        xmlns:Presentation="clr-namespace:DotBeer.UI.WPFClient"
        Presentation:PositionProperties.SavePositionAndState="True"
        Presentation:InputBindingsProperties.UseInputBindingsProperty="True"
        Title="DotBeer - options" 
        Height="640" 
        Width="767" 
        Background="{DynamicResource BrushWindowBackground}"
        Icon="/DotBeer.UI.WPFClient;component/Images/icon.ico">
	<Window.Resources>
		<System:Double x:Key="ButtonWidth">100</System:Double>
		<System:Double x:Key="ButtonHeight">25</System:Double>
	</Window.Resources>
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="*"/>
    		<RowDefinition Height="77"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="121.887"/>
    		<ColumnDefinition Width="*"/>
    	</Grid.ColumnDefinitions>
        <TreeView x:Name="TreeViewItemOptions"
                  Margin="6,6,4,4" 
                  Style="{DynamicResource TreeViewStyle}" 
                  BorderThickness="0,0,0,0" 
                  Grid.RowSpan="1" 
                  ItemsSource="{Binding Path=Options, Mode=OneWay}"
                  Presentation:TreeViewProperties.UseSelectedItem="True"
                  Presentation:TreeViewProperties.SelectedItem="{Binding Path=SelectedOption, Mode=OneWayToSource}"/>
    	<Border Background="{DynamicResource BrushControlBackgroundLight}" 
                Margin="5,5,5,5" 
                VerticalAlignment="Stretch" 
                Height="Auto" 
                Grid.Column="2" 
                Grid.Row="0" 
                Grid.RowSpan="2" 
                BorderBrush="{DynamicResource ImpassiveColor4}" 
                BorderThickness="{DynamicResource ThicknessSize_1}" 
                CornerRadius="{DynamicResource CornerRadiusSmall}">
            <ContentPresenter Content="{Binding Path=CurrentOptionControl, Mode=OneWay}" />
        </Border>
    	<Border Background="{DynamicResource BrushControlBackgroundLight}" 
                Margin="5,5,5,5" 
                VerticalAlignment="Stretch" 
                Height="Auto" 
                Grid.Column="0" 
                Grid.Row="1" 
                BorderBrush="{DynamicResource ImpassiveColor4}" 
                BorderThickness="{DynamicResource ThicknessSize_1}" 
                CornerRadius="{DynamicResource CornerRadiusSmall}">
    		<Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
    			<Button x:Name="ButtonCancel"
                        Command="{Binding CancelCommand}"
                        HorizontalAlignment="Center" 
                        Style="{DynamicResource ButtonLightStyle}" 
                        VerticalAlignment="Center" 
                        Width="{DynamicResource ButtonWidth}" 
                        Height="{DynamicResource ButtonHeight}" 
                        Content="Cancel" 
                        IsCancel="True" 
                        Grid.Row="0" 
                        Margin="5,5,5,2" />
    			<Button x:Name="ButtonSave"
                        Command="{Binding SaveCommand}"
                        HorizontalAlignment="Center" 
                        Style="{DynamicResource ButtonLightStyle}" 
                        VerticalAlignment="Center" 
                        Content="Save" 
                        IsDefault="True" 
                        Grid.Row="1" 
                        Width="{DynamicResource ButtonWidth}" 
                        Height="{DynamicResource ButtonHeight}" 
                        Margin="5,3,5,5" />
    		</Grid>
    	</Border>
    </Grid>
</Window>
